<template>
  <div class="homePageBox">
    <el-row :gutter="20">
      <el-col :span="16">
        <div
          class="userInfoCardWeather"
          style="
            background: url('https://saas2-aliyun.oss-cn-hangzhou.aliyuncs.com/saas2/publicFile/tenant_533990185986437120/tenantCustomImg/20231118/1700311531748.jpg');
          "
        >
          <div class="card_top">
            <div class="avatar_box">
              <img
                src="../assets/images/active.png"
                class="avatar_frame"
                alt=""
              />
              <img
                src="../assets/images/headImage.jpg"
                class="avatar"
                alt=""
              />
            </div>
            <div class="text">
              <div class="name">
                <div class="" :title="userInfo.nickName">{{ userInfo.nickName }}</div>
              </div>
              <div class="orgName">{{ userInfo.dept ? userInfo.dept.deptName : '' }}</div>
              <div class="">
                <div class="">
                  <span>本年个人积分</span>
                  <span>{{ myStatData.t3? myStatData.t3==-10000? '' : myStatData.t3 : '' }}</span>
                </div>
              </div>
            </div>
          </div>
          <div class="card_bottom">
            <div class="count_item">
              <div class="title">组织总数</div>
              <div class="num">{{ myStatData.t2? myStatData.t2 : 0 }}</div>
            </div>
            <div class="split_line"></div>
            <div class="count_item">
              <div class="title">党员总数</div>
              <div class="num">{{ myStatData.t1? myStatData.t1 : 0 }}</div>
            </div>
            <div class="split_line"></div>
            <div class="count_item">
              <div class="title">荣誉情况</div>
              <div class="num">组织荣誉数:{{ myStatData.t4? myStatData.t4 : 0 }}&nbsp;&nbsp;个人荣誉数:{{ myStatData.t5? myStatData.t5 : 0 }}</div>
            </div>
          </div>
        </div>
      </el-col>
      <el-col :span="8">
        <div class="menuListBox">
          <div class="menuListBox_top">
            <div class="public_title">我的常用功能</div>
          </div>
          <div class="menu_con">
            <div class="menu_list">
              <div class="menu_box" @click="goWebSite('zzxx')" v-hasPermi="['partybuilding:Org:list']">
                <div class="menu_icon_box">
                  <img
                    class="menu_icon"
                    src="../assets/images/icon_zzxx.png"
                    alt=""
                  />
                </div>
                <div class="">组织信息</div>
              </div>

              <div class="menu_box" @click="goWebSite('dyxx')" v-hasPermi="['partybuilding:Member:list']">
                <div class="menu_icon_box">
                  <img
                    class="menu_icon"
                    src="../assets/images/icon_dyxx.png"
                    alt=""
                  />
                </div>
                <div class="">党员管理</div>
              </div>

              <div class="menu_box" @click="goWebSite('bzgl')" v-hasPermi="['partybuilding:TeamRecord:list']">

                <div class="menu_icon_box">
                  <img
                    class="menu_icon"
                    src="../assets/images/icon_bzgl.png"
                    alt=""
                  />
                </div>
                <div class="">班子管理</div>
              </div>
            
              <div class="menu_box" @click="goWebSite('zzjf')" v-hasPermi="['partybuilding:WorkScore:list']">
                <div class="menu_icon_box">
                  <img
                    class="menu_icon"
                    src="../assets/images/icon_jfgl.png"
                    alt=""
                  />
                </div>
                <div class="">组织积分</div>
              </div>
            </div>

            <div class="menu_list">
              <div class="menu_box" @click="goWebSite('hygl')" v-hasPermi="['partybuilding:MeetingInfo:list']">
                <div class="menu_icon_box">
                  <img
                    class="menu_icon"
                    src="../assets/images/icon_zzsh.png"
                    alt=""
                  />
                </div>
                <div class="">会议管理</div>
              </div>
             
              <div class="menu_box" @click="goWebSite('rygl')" v-hasPermi="['partybuilding:Honor:list']">
                <div class="menu_icon_box">
                  <img
                    class="menu_icon"
                    src="../assets/images/icon_rygl.png"
                    alt=""
                  />
                </div>
                <div class="">荣誉管理</div>
              </div>

              <div class="menu_box" @click="goWebSite('mzpy')" v-hasPermi="['partybuilding:Review:list']">
                <div class="menu_icon_box">
                  <img
                    class="menu_icon"
                    src="../assets/images/icon_mzpy.png"
                    alt=""
                  />
                </div>
                <div class="">民主评议</div>
              </div>

              <div class="menu_box" @click="goWebSite('lmgl')" v-hasPermi="['partybuilding:NewsType:list']">
                <div class="menu_icon_box">
                  <img
                    class="menu_icon"
                    src="../assets/images/icon_lmgl.png"
                    alt=""
                  />
                </div>
                <div class="">栏目管理</div>
              </div>
            </div>

          </div>
        </div>
      </el-col>
    </el-row>
    <el-row style="margin: 20px 0px;">
      <el-col :span="16">
        <div class="party_structure">
          <div class="member-structure-wrap">
            <div class="header">
              <div class="public_title">党员结构</div>
              <div class="more" @click="handleMore('member')">
                <el-icon><ArrowRightBold /></el-icon>
              </div>
            </div>
            <div class="chart-wrap">
              <div class="chart">
                <div class="manAndWomen">
                  <el-tooltip
                      effect="customized"
                      hide-after="0"
                      raw-content
                      :content="'党员结构<br/>男性：'+memberData.boys+'('+memberData.boysRate+'%)'"
                      placement="top">
                      <div class="">
                        <img src="../assets/images/nan.png" alt="" />
                        <div class="slideHeight" :style="{height: memberData.boysRate*1.2+'px'}">
                          <img src="../assets/images/nan_pink.png" alt="" />
                        </div>
                        <p>{{ memberData.boysRate+'%' }}</p>
                        <p class="person_title">男性</p>
                      </div>
                  </el-tooltip>
                  <el-tooltip
                      effect="customized"
                      hide-after="0"
                      raw-content
                      :content="'党员结构<br/>女性：'+memberData.girls+'('+memberData.girlsRate+'%)'"
                      placement="top">
                      <div class="">
                        <img src="../assets/images/nv.png" alt="" />
                        <div class="slideHeight" :style="{height: memberData.girlsRate*1.2+'px'}">
                          <img src="../assets/images/nv_pink.png" alt="" />
                        </div>
                        <p>{{ memberData.girlsRate+'%' }}</p>
                        <p class="person_title">女性</p>
                      </div>
                  </el-tooltip>
                </div>
              </div>
              <div class="chart">
                <!--<pie-chart :title="dangDeptTitle" :dataArray="dangDeptPeoples"/>-->
                <circle-pie-chart :width="circleWidth" :circleTitle="dangDeptTitle" :dataArray="dangOrgArr"/>
              </div>
            </div>
            <p class="chart_desc">党员学历占比</p>
          </div>
          <div class="structure-line"></div>
          <div class="three-lesson-wrap">
            <div class="header">
              <div class="public_title">三会一课</div>
            </div>
            <div class="lesson-bar-chart">
              <bar-chart :xDatas="xMeetingDatas" :yDatas="yMeetingDatas" />
            </div>
          </div>
          <div class="bottom-line"></div>
          <div class="member-structure-wrap">
            <div class="header">
              <div class="public_title">组织积分排名&nbsp;<em style="color: #d01515;">TOP5</em></div>
              <div class="more" @click="handleMore('orgScore')">
                <el-icon><ArrowRightBold /></el-icon>
              </div>
            </div>
            <div
              class="tenant-wrap"
              style="max-height: 390px; overflow: hidden;"
            >
              <div class="list" v-for="(item, index) in orgPeoples" :key="index">
                <img v-if="index == 0" src="../assets/images/one.png" alt="" />
                <img
                  v-else-if="index == 1"
                  src="../assets/images/two.png"
                  alt=""
                />
                <img
                  v-else-if="index == 2"
                  src="../assets/images/three.png"
                  alt=""
                />
                <span v-else>{{ index + 1 }}</span>
                <div class="">
                  <div class="">
                    <h1>{{ item.deptName }}</h1>
                    <h2>党员人数：{{item.statMember}}人</h2>
                  </div>
                  <p>总分<span>{{item.scoreSum}}分</span></p>
                </div>
              </div>
            </div>
          </div>
          <div class="structure-line"></div>
          <div class="three-lesson-wrap">
            <div class="header">
              <div class="public_title">党员积分排名&nbsp;<em style="color: #d01515;">TOP5</em></div>
              <div class="more" @click="handleMore('dangScore')">
                <el-icon><ArrowRightBold /></el-icon>
              </div>
            </div>

            <div
              class="tenant-wrap"
              style="max-height: 390px; overflow: hidden;"
            >
              <div class="list" v-for="(item, index) in dangPeoples" :key="index" style="margin: 17px 0px;">
                <img v-if="index == 0" src="../assets/images/one.png" alt="" />
                <img
                  v-else-if="index == 1"
                  src="../assets/images/two.png"
                  alt=""
                />
                <img
                  v-else-if="index == 2"
                  src="../assets/images/three.png"
                  alt=""
                />
                <span v-else>{{ index + 1 }}</span>
                <div class="">
                  <div class="">
                    <h1>{{ item.nickName }}</h1>
                  </div>
                  <p>总分<span>{{ item.scoreSum }}分</span></p>
                </div>
              </div>
            </div>
          </div>
        </div>
      </el-col>
      <el-col :span="8" style="padding-left: 14px;">
        <div class="leader-ship-box">
          <div class="header">
            <div class="public_title">领导视图</div>
            <!--<div class="more">
              <el-icon><ArrowRightBold /></el-icon>
            </div>-->
          </div>
          <div class="ship-item-wrap">
            <div
              class="view-item"
              :class="{
                color_0: index == 0,
                color_1: index == 1,
                color_2: index == 2,
                color_3: index == 3,
              }"
              v-for="(item, index) in 1"
              :key="index"
            >
              <div class="view-logo">
                <img src="../assets/images/icon1.png" alt="" />
              </div>
              <div class="view-org-name">{{ companyVerson }}党委</div>
            </div>
          </div>
        </div>
        <div class="leader-ship-box">
          <div class="header">
            <div class="public_title">宣传阵地</div>
            <!--<div class="more">
              <el-icon><ArrowRightBold /></el-icon>
            </div>-->
          </div>
          <div class="ship-item-wrap">
            <div class="view-item" @click="handlePreview" style="width:100%!important">
              <img
                src="../assets/images/icon2.png"
                style="width: 15px; height: auto; margin-right: 14px"
                alt=""
              />
              <div class="flag-org-name">{{ companyVerson }}党委</div>
            </div>
          </div>
        </div>
        <div class="leader-ship-box">
          <div class="header">
            <div class="public_title">消息通知</div>
            <div class="more" @click="goWebSite('msg')">
              <el-icon><ArrowRightBold /></el-icon>
            </div>
          </div>
          <div class="ship-item-wrap">
            <div class="notice_detail" v-for="item in messageList" :key="item.id" @click="handleMessage(item)">
              <div class="title">{{item.title}}</div>
              <div class="time">{{item.content}}</div>
            </div>
          </div>
        </div>
      </el-col>
    </el-row>
  </div>
</template>
<script setup name="Index">
import { meetingStat as statMeeting, memberStat as statOrgMember } from "@/api/partybuilding/DataDriver";
import { memberStat, myData, scoreStat } from "@/api/stat/index";
import { myMessages } from "@/api/partybuilding/Message";
import router from "@/router";
import CirclePieChart from "./dashboard/CirclePieChart.vue";
import BarChart from "./dashboard/BarChart.vue";
import { getUserProfile } from "@/api/system/user";
const baseUrl = import.meta.env.VITE_SITE_SIGN_URL;
const companyVerson = import.meta.env.VITE_APP_COMPANY_VERSION;
const userInfo = ref({}); //用户信息
const myStatData = ref({}); //个人数据
const memberData = ref([]); //党员数据
const meetingList = ref([]); //三会一课
const circleWidth = "85%"; //圆环宽度
const memberObj = ref({
    t1: [],//党员信息
    t2: [],//汉族人数
    t3: [],//学历
    t4: [],//男女比例
    t5: []//党龄分布
});// 党员数量统计
const dangOrgArr = ref([]); //各党支部人数占比
const meetingObj = ref({});// “三会一课”
const xMeetingDatas = ref([]); //X轴三会一课
const yMeetingDatas = ref([]); //Y轴三会一课
const dangPeoples = ref([]); //党员列表TOP5
const orgPeoples = ref([]); //组织列表TOP5
const messageList = ref([]); //消息通知列表
const dangDeptPeoples = ref([]); //各党支部人数占比
const dangDeptTitle = ref("各党支部人数占比"); //各党支部人数占比标题
const data = reactive({
  queryParams: {
    pageNum: 1,
    pageSize: 6,
    status: null
  }
});
const { queryParams } = toRefs(data);

// 获取用户信息
function getUserInfo() {
  getUserProfile().then((res) => {
    userInfo.value = res.data;
  });
}

// 初始化数据
function initStatData() {
  // 个人统计信息
  myData().then((res) => {
    myStatData.value = res.data;
  });

  // 党员统计信息
  memberStat({ deptId: userInfo.value.deptId }).then((res) => {
    memberData.value = res.data;
    memberData.value.total = memberData.value.t1? memberData.value.t1 : 0;
    memberData.value.boys = memberData.value.t2? memberData.value.t2 : 0;
    memberData.value.boysRate = Math.round((memberData.value.boys / memberData.value.total) * 100);
    memberData.value.girls = memberData.value.total-memberData.value.boys;
    memberData.value.girlsRate = Math.round((memberData.value.girls / memberData.value.total) * 100);

    let tmpDeptPeoples = memberData.value.t3;
    dangDeptPeoples.value = [];
    tmpDeptPeoples.forEach(element => {
      dangDeptPeoples.value.push({ name: element.deptName, value: element.statMember });
    });
  });

  // 党员学历
  statOrgMember().then(response => {
    memberObj.value = response.data;
    let tmpDegreeArray = memberObj.value.t3;//党员学历
    dangOrgArr.value = [];
    tmpDegreeArray.forEach(item => {
        dangOrgArr.value.push({ value: item[0], name: item[1] });
    });
  });

  // 三会一课
  // meetingStat().then((res) => {
  //   let tmpMeetingList = res.data;
  //   xMeetingDatas.value = [];
  //   yMeetingDatas.value = [];
  //   tmpMeetingList.forEach(item => {
  //     xMeetingDatas.value.push(item.t5.deptName);
  //     yMeetingDatas.value.push(item.t1+item.t2+item.t3+item.t4);
  //   });
  // });
  // 会议统计
  statMeeting().then(response => {
      meetingObj.value = response.data;
      xMeetingDatas.value = [];
      yMeetingDatas.value = [];

      xMeetingDatas.value.push("党支部党员大会");
      yMeetingDatas.value.push(meetingObj.value.t1? meetingObj.value.t1 : 0);

      xMeetingDatas.value.push("党支部委员会");
      yMeetingDatas.value.push(meetingObj.value.t2? meetingObj.value.t2 : 0);

      xMeetingDatas.value.push("党小组会");
      yMeetingDatas.value.push(meetingObj.value.t3? meetingObj.value.t3 : 0);

      xMeetingDatas.value.push("党课");
      yMeetingDatas.value.push(meetingObj.value.t4? meetingObj.value.t4 : 0);
  });

  // 组织和个人积分排名
  scoreStat({ top: 5 }).then((res) => {
    // t1党员排名,t2组织排名-statMember表示人员数量
    dangPeoples.value = res.data.t1;
    orgPeoples.value = res.data.t2;
  });

  
  // 获取消息通知
  getMessageList();
}

//更多
function handleMore(type) {
  if (type == 'member') {
    location.href = '/org/Member';
  } else if (type == 'orgScore') {
    location.href = '/work/scoreManage/orgScore';
  } else if (type == 'dangScore') {
    location.href = '/work/scoreManage/WorkScore';
  } else {
    location.href = '/org/Member';
  }
}

function handleMessage(item) {
  router.push({ path: "/tool/Message", query: { id: item.id } });
}


// 跳转到页面
function goWebSite(type) {
  if (type == 'zzxx') {
    router.push({ path: "/org/Org" });
  } else if (type == 'dyxx') {
    router.push({ path: "/org/Member" });
  } else if (type == 'bzgl') {
    router.push({ path: "/org/TeamRecord" });
  } else if (type == 'zzjf') {
    router.push({ path: "/work/scoreManage/orgScore" });
  } else if (type == 'hygl') {
    router.push({ path: "/work/MeetingList" });
  } else if (type == 'rygl') {
    router.push({ path: "/work/Honor" });
  } else if (type == 'mzpy') {
    router.push({ path: "/work/Review" });
  } else if (type == 'lmgl') {
    router.push({ path: "/web/NewsType" });
  } else if (type == 'msg') {
    router.push({ path: "/tool/Message" });
  }
}

// 获取消息通知
function getMessageList() {
  queryParams.value.orderByName = 'createTime'; 
  queryParams.value.descIs = true;
  myMessages(queryParams.value).then((res) => {
    messageList.value = res.rows;
  });
}

/** 预览网站 */
function handlePreview() {
  window.open(baseUrl);
}

window.name="MyWindow";

initStatData();
getUserInfo();
</script>
<style>
.el-popper.is-customized {
  padding: 15px;
  background-color: #ffffff;
  border: 1px solid rgb(80, 131, 248);
  margin: 0;
  font: 14px / 21px "Microsoft YaHei";
  color: rgb(102, 102, 102);
  z-index: 99999;
}
.el-popper.is-customized .el-popper__arrow::before {
  background-color: rgb(255, 255, 255);
  opacity: 0.1;
  right: 0;
}
</style>
<style lang="scss" scoped>
.homePageBox {
  color: #333;
  margin: 24px 16px 0;
  .userInfoCardWeather {
    position: relative;
    background-repeat: no-repeat;
    background-size: cover;
    height: 250px;
    padding: 20px 20px 0;
    border-radius: 16px;
    overflow: hidden;
    .card_top {
      display: flex;
      height: 50%;
      border-bottom: 1px solid #eed5a6;
      .avatar_box {
        position: relative;
        width: 100px;
        height: 100px;
        .avatar_frame {
          position: absolute;
          left: 0;
          top: 0;
          width: 100px;
          height: 100px;
        }
        .avatar {
          width: 100px;
          height: 100px;
          border-radius: 100%;
        }
      }
      .text {
        padding-top: 10px;
        padding-left: 20px;
        color: #8a5c02;
        font-size: 14px;
        line-height: 30px;
        .name {
          font-size: 22px;
        }
      }
    }
    .card_bottom {
      display: flex;
      height: 50%;
      justify-content: space-between;
      align-items: center;
      .count_item {
        width: 24%;
        text-align: center;
        .title {
          color: #8a5c02;
          font-size: 14px;
        }
        .num {
          color: #000;
          font-size: 14px;
          padding-top: 7px;
        }
      }
      .split_line {
        width: 1px;
        height: 55px;
        background-color: rgb(238, 213, 166);
      }
    }
  }
  .more {
    width: 20px;
    height: 20px;
    line-height: 25px;
    background-color: #eeeff3;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    color: #16174a;
  }
}
.menuListBox {
  height: 250px;
  border-radius: 16px;
  .menuListBox_top {
    position: relative;
    display: flex;
    justify-content: space-between;
    padding: 0px 20px;
    .public_title {
      font-size: 18px;
      font-weight: 700;
    }
    .set {
      padding: 4px 12px;
      font-size: 14px;
      background-color: rgb(238, 239, 243);
      color: rgb(22, 23, 74);
      cursor: pointer;
      display: flex;
      align-items: center;
    }
  }
  .menu_con {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: 230px;
    .menu_list {
      margin-bottom: 10px;
      display: flex;
      .menu_box {
        width: 25%;
        font-size: 14px;
        text-align: center;
        .menu_icon_box {
          margin: 0px auto;
          width: 60px;
          height: 60px;
          .menu_icon {
            width: 100%;
            cursor: pointer;
          }
        }
      }
    }
  }
}
.party_structure {
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  .header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    align-items: center;
    .public_title {
      font-size: 18px;
      font-weight: 700;
    }
    .item_tag {
      margin-left: 10px;
      padding: 4px;
      font-size: 14px;
      background-color: #eeeff3;
      color: #16174a;
      cursor: pointer;
      display: flex;
      align-items: center;
      img {
        width: 14px;
        height: 14px;
        margin-right: 10px;
      }
    }
  }
  .member-structure-wrap {
    width: calc(50% - 41px);

    .chart_desc {
      font-size: 14px;
      font-weight: bold;
      color: #000;
      position: relative;
      top: -19px;
      left: 65%;
    }
    .chart-wrap {
      display: flex;
      align-items: center;
      justify-content: space-around;
      .chart {
        margin-top: 25px;
        width: 200px;
        height: 200px;
        display: flex;
        align-items: center;
        justify-content: center;
        
        .manAndWomen {
          margin-top: 20px;
          display: flex;
          justify-content: center;
          div {
            margin-right: 12px;
            position: relative;
            width: 66px;
            height: 120px;
            img {
              width: 66px;
              height: 120px;
              position: absolute;
              left: 0;
              bottom: 0;
              object-fit: unset;
            }
            div {
              width: 66px;
              overflow: hidden;
              position: absolute;
              left: 0;
              bottom: 0;
              z-index: 20;
            }
            p {
              width: 66px;
              position: absolute;
              left: 0;
              bottom: 0;
              z-index: 30;
              text-align: center;
              line-height: 65px;
              font-size: 20px;
              color: #ffffff;
            }
          }
          .person_title {
            font-size: 14px;
            font-weight: bold;
            color: #000;
            position: relative;
            top: 110px;
          }
        }
      }
    }
  }
  .structure-line {
    border-right: 1px dashed #dcdcdc;
  }
  .bottom-line {
    border-top: 1px solid #e6e7eb;
    width: 100%;
    margin: 30px 0;
  }
  .three-lesson-wrap {
    width: calc(50% - 3px);
  }
  .con_box {
    .top_box {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
  }
  .chart_title {
    font-size: 16px;
    padding: 5px 0;
  }
}
.leader-ship-box {
  padding: 20px;
  background: #fff;
  border-radius: 16px;
  margin-bottom: 15px;
  .header {
    display: flex;
    margin-bottom: 13px;
    justify-content: space-between;
    .public_title {
      font-size: 18px;
      font-weight: 700;
    }
  }
  .ship-item-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    .view-item {
      width: calc(56% - 8px);
      height: 55px;
      border-radius: 6px;
      display: flex;
      align-items: center;
      padding: 8px 6px;
      box-sizing: border-box;
      margin-bottom: 7px;
      cursor: pointer;
      .flag-org-name {
        font-size: 15px;
        color: #000;
      }
      .view-logo {
        width: 40.32px;
        height: 40.32px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #ffffff;
        border-radius: 100%;
        margin-right: 5px;
        img {
          width: 60%;
          height: auto;
          margin-right: 0;
        }
      }
      .view-org-name {
        width: calc(100% - 45.32px);
        font-family: PingFangSC-Medium;
        font-size: 14px;
        color: #fff;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical /*! autoprefixer: on */;
      }
    }
    .notice_detail {
      margin-top: 14px;
      height: 56px;
      cursor: pointer;
      width: 100%;
      .title {
        font-size: 16px;
        font-weight: 400;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2; /* 显示的行数，可以根据需要修改 */
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .time {
        color: rgba(0, 0, 0, 0.45);
        font-size: 14px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }
    .color_0 {
      background-image: none !important;
      background: #fe4c4e;
    }
    .color_1 {
      background-image: none !important;
      background: #4481ff;
    }
    .color_2 {
      background-image: none !important;
      background: #ffa751;
    }
    .color_3 {
      background-image: none !important;
      background: #00cdf1;
    }
  }
}
.tenant-wrap {
  // display: flex;
  // align-items: center;
  // justify-content: space-between;
  .list {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    & > span {
      width: 16px;
      height: 16px;
      background: #ffd9e0;
      color: #fff;
      font-size: 12px;
      text-align: center;
      line-height: 16px;
      border-radius: 50%;
    }
    & > div {
      width: calc(100% - 40px);
      border-bottom: 1px solid #e6e7eb;
      align-items: center;
      display: flex;
      & > div {
        flex: 1;
        h1 {
          font-size: 15px;
          color: #333;
          margin-bottom: 5px;
          word-break: break-all;
        }
        h2 {
          margin-bottom: 10px;
          font-size: 12px;
          color: #8c8c8c;
          font-weight: 400;
        }
      }
      p {
        color: #8c8c8c;
        font-size: 12px;
        span {
          color: #ff4d4f;
          font-size: 15px;
          padding-left: 6px;
        }
      }
    }
  }
  img {
    width: 20px;
    height: auto;
  }
}
</style>

